<?php

require_once './include_util.php';
session_start();

$result = null;
if (array_key_exists("submit", $_REQUEST)) {
	require_once '../lib/Methods.php';
	$method = GG_API_Methods::newOauthMethod();
	configApiMethod($method);
	$method->setUseOauth(true);
	$method->setSpace($_REQUEST['methodSpace']);
	$method->setName($_REQUEST['methodName']);
	$result = $method->call();
}

?>

<?php
	$tpl = array(
		"title" => "test",
		"url" => "test.php",
	);
	include './include_header.php';
?>
<form action="" method="GET">
	<table cellpadding="0" cellspacing="1">
		<?php include './include_formFieldsSettings.php'; ?>
		<tr>
			<td class="Label">method space:</td>
			<td><input type="text" class="Input" name="methodSpace" value="profile"/></td>
		</tr>
		<tr>
			<td class="Label">method name:</td>
			<td><input type="text" class="Input" name="methodName" value="get"/></td>
		</tr>
		<tr>
			<td class="Label">&nbsp;</td>
			<td><input type="submit" class="Submit" name="submit" value="Call"/></td>
		</tr>
	</table>
</form>
<?php include './include_footer.php'; ?>